package com.kuang.demo1;

import com.kuang.UserService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

//https://blog.csdn.net/qq_51307593/article/details/126184177
public class MyTest {

    public static void main(String[] args) {
        ApplicationContext Context = new ClassPathXmlApplicationContext("beans.xml");
        //动态代理代理的是接口
        UserService userService = Context.getBean("userService", UserService.class);
        userService.add();

    }
}

